<template>
  <div id="accountMonitorCon">
    <div class="header">
      <!-- <span class="tit">监控状态</span> -->
      <!-- <el-select v-model="value" placeholder="请选择">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
      </el-select>-->
      <section class="section_01">
        <div class="section_01_box">
          <radio_group01 :radio_values="options" v-model="value" />
          <section class="input_group">
            <input
              type="text"
              v-model.trim="input01"
              placeholder="输入达人名称或抖音号查询"
              @keyup.enter="search_input()"
            />
            <div @click="search_input()" class="imgBox">
              <!-- <img src="@/assets/meng/search01.png" /> -->
            </div>
          </section>
        </div>
        <div>
          <button v-if="!isdel&&!AuthorMonitoList.length" class="but_admin">
            <img src="@/assets/liu/adminIcon.png" />
            管理
          </button>
          <button v-if="!isdel&&AuthorMonitoList.length" class="but_admin" @click="but_admin">
            <img src="@/assets/liu/adminIcon.png" />
            管理
          </button>
          <button v-if="isdel&&AuthorMonitoList.length" class="but_complete" @click="but_admin">完成</button>
          <button class="add" @click="add">
            <img src="@/assets/liu/add.png" />
            添加监测
          </button>
        </div>
      </section>
    </div>
    <div
      v-if="listLoading && !AuthorMonitoList.length"
      style="margin-top: 30px; margin-bottom: 100px"
      v-loading="listLoading"
      element-loading-text="拼命加载中"
      element-loading-spinner="el-icon-loading"
    ></div>
    <ul class="ul">
      <li v-for="(item, i) in AuthorMonitoList && AuthorMonitoList" :key="i + 'i'">
        <div class="item_box">
          <div class="top">
            <img />
            <img :src="item.logo" @click="talentDetails(item.authorId)" class="logo" />

            <div class="cen">
              <p @click="talentDetails(item.authorId)" class="name">{{ item.nickName }}</p>
              <p>抖音号：{{ item.uniqueId }}</p>
              <div></div>
              <!-- <p>粉丝数：{{ format_num(item.totalFans) }}</p> -->
              <!-- <p>粉丝数：{{ format_num(item.totalFans) }}</p> -->
            </div>
            <!-- 监控状态: 0 未开始 ;  1 监测中 ;  2 监控结束   3 已取消   ,默认0 -->
            <div class="rig">
              <button
                v-if="
                  (item.monitoringState == 0 || item.monitoringState == 1) &&
                    !isdel
                "
                @click="cancel(item.id)"
              >取消监测</button>
              <button
                v-if="
                  (item.monitoringState == 2 || item.monitoringState == 3) &&
                    !isdel
                "
                @click="again(item.authorId, item.nickName)"
                class="again"
              >重新监测</button>
              <button v-if="isdel" @click="del(item.id)">删除</button>
              <!-- <p class="notStarted">未开始</p> -->
              <!-- <p v-if="item.monitoringState==1" class="rigMonitoring">
                <img src="@/assets/liu/Monitoring.png" />
                监控中
              </p>-->
              <!-- <p  class="notStarted">已完成</p> -->
              <!-- <p v-else class="notStarted">已取消</p> -->
            </div>
          </div>
          <div class="new_monitor_box">
            <div class="monitor_top">
              <div class="title">监测时间段</div>
              <div class="data" @click="monitorList(i, item.id)">
                已监控
                <span>{{ item.monitoringAwemeCount }}</span>个
              </div>
            </div>
            <div class="monitor_btm">
              {{ item.startTime }}
              <span>至</span>
              {{ item.stopTime }}
            </div>
          </div>
          <div class="bot">
            <div class="accountNumberBot">
              <div>
                <p>{{ format_num(item.totalFans) }}</p>
                <p>粉丝数</p>
                <p>
                  昨日
                  <img
                    v-if="item.authorDataOverVM.totalFansComp < 0"
                    class="pingImg"
                    src="@/assets/wang/goods/down.png"
                  />
                  <img v-else class="pingImg" src="@/assets/wang/goods/up.png" />
                  <span
                    v-if="item.authorDataOverVM.totalFansComp >= 0"
                    class="ea1b0b"
                  >{{ format_num(item.authorDataOverVM.totalFansComp) }}</span>
                  <span v-if="item.authorDataOverVM.totalFansComp < 0">
                    {{
                    format_num(item.authorDataOverVM.totalFansComp * -1)
                    }}
                  </span>
                </p>
              </div>
              <div>
                <p>{{ format_num(item.totalFavorite) }}</p>
                <p>点赞数</p>
                <p>
                  昨日
                  <img
                    v-if="item.authorDataOverVM.totalFavoriteComp < 0"
                    class="pingImg"
                    src="@/assets/wang/goods/down.png"
                  />
                  <img v-else class="pingImg" src="@/assets/wang/goods/up.png" />
                  <span v-if="item.authorDataOverVM.totalFavoriteComp < 0">
                    {{
                    format_num(item.authorDataOverVM.totalFavoriteComp) * -1
                    }}
                  </span>
                  <span v-else class="ea1b0b">
                    {{
                    format_num(item.authorDataOverVM.totalFavoriteComp)
                    }}
                  </span>
                </p>
              </div>
              <div>
                <p>{{ format_num(item.totalComment) }}</p>
                <p>评论数</p>
                <p>
                  昨日
                  <img
                    v-if="item.authorDataOverVM.totalCommentComp < 0"
                    class="pingImg"
                    src="@/assets/wang/goods/down.png"
                  />
                  <img v-else class="pingImg" src="@/assets/wang/goods/up.png" />
                  <span v-if="item.authorDataOverVM.totalCommentComp < 0">
                    {{
                    format_num(item.authorDataOverVM.totalCommentComp) * -1
                    }}
                  </span>
                  <span v-else class="ea1b0b">
                    {{
                    format_num(item.authorDataOverVM.totalCommentComp)
                    }}
                  </span>
                </p>
              </div>
              <div>
                <p>{{ format_num(item.totalVideo) }}</p>
                <p>视频数</p>
                <p>
                  昨日
                  <img
                    v-if="item.authorDataOverVM.totalVideoComp < 0"
                    class="pingImg"
                    src="@/assets/wang/goods/down.png"
                  />
                  <img v-else class="pingImg" src="@/assets/wang/goods/up.png" />
                  <span v-if="item.authorDataOverVM.totalVideoComp < 0">
                    {{
                    format_num(item.authorDataOverVM.totalVideoComp) * -1
                    }}
                  </span>
                  <span v-else class="ea1b0b">
                    {{
                    format_num(item.authorDataOverVM.totalVideoComp)
                    }}
                  </span>
                </p>
              </div>
            </div>
            <div class="contrast">
              <!-- <button @click="del(item.id)">删除</button> -->
              <el-dialog :visible.sync="dialogVisible">
                <p class="p1">删除监控</p>
                <span class="isTips">确定将该达人移除监测列表吗？</span>
                <span slot="footer" class="dialog-footer">
                  <el-button class="butTips" type="primary" @click="dialog1">确 定</el-button>
                  <el-button class="color" @click="dialogVisible = false">取 消</el-button>
                </span>
              </el-dialog>
              <!-- <button v-if="item.monitoringState!=0" @click="cancel(item.id)">取消监测</button> -->
              <el-dialog :visible.sync="dialogVisible1">
                <p class="p1">取消监控</p>
                <span class="isTips">确定将该达人取消监测吗？</span>
                <span slot="footer" class="dialog-footer">
                  <el-button class="butTips" type="primary" @click="dialog">确 定</el-button>
                  <el-button class="color" @click="dialogVisible1 = false">取 消</el-button>
                </span>
              </el-dialog>
              <!-- <button class="again" v-if="item.monitoringState==0"
              @click="again(item.authorId,item.nickName)">重新监测</button>-->
            </div>
          </div>
        </div>
      </li>
    </ul>

    <!-- 直播间弹窗 -->
    <div class="talentPopupList">
      <el-dialog @close="close" :visible.sync="popupList" custom-class="buyDialog">
        <div class="accountDiolog">
          <p class="title">账号监测</p>
          <section class="input_group">
            <input
              type="text"
              v-model.trim="input02"
              placeholder="输入达人名称或抖音号查询"
              @keyup.enter="search_input1()"
            />
            <div @click="search_input1()">
              <img src="@/assets/meng/search01.png" />
            </div>
          </section>
          <div
            style="margin-top: 30px; margin-bottom: 100px"
            v-if="table_data.length == 0 && roomLoading"
            v-loading="roomLoading"
            element-loading-text="拼命加载中"
            element-loading-spinner="el-icon-loading"
          ></div>
          <ul class="searchResult" v-if="table_data.length != 0">
            <li
              :class="index == item.unique_id ? 'borderColor' : ''"
              v-for="(item, i) in table_data"
              :key="i + item"
              @click="choiceTalent(item.unique_id, item.author_id)"
            >
              <div class="logo">
                <img :src="item.logo" v-errorImg:talent />
              </div>
              <div class="info">
                <p class="name">{{ item.nickname }}</p>
                <p class="tiktok">抖音号：{{ item.unique_id }}</p>
                <!-- <p class="brief">简介：{{item.introduce}}</p> -->
              </div>
              <div v-if="index == item.unique_id">
                <img src="@/assets/liu/Couplet.png" />
              </div>
            </li>
          </ul>
          <div class="jc_no_data" v-if="table_data.length == 0 && !roomLoading && showInclude">
            <div class="zw">
              <img src="@/assets/liu/zw.png" />
              <p>暂无数据</p>
            </div>
          </div>
          <!-- 2.25 新添加的    开始 -->
          <div class="duration" v-if="choiceValue.length">
            监控时长
            <span>共{{ choiceValue }}监测</span>
          </div>
          <div class="duration" v-else>
            监控时长
            <span>共0小时监测</span>
          </div>
          <div class="choice">
            <button :class="choiceValue == '24小时' ? 'active' : ''" @click="choice('24小时')">24小时</button>
            <button :class="choiceValue == '48小时' ? 'active' : ''" @click="choice('48小时')">48小时</button>
            <button
              :class="choiceValue == '72小时' && Hour != 0 ? 'active' : ''"
              @click="choice('72小时')"
            >72小时</button>
            <button :class="choiceValue == '7天' ? 'active' : ''" @click="choice('7天')">7天</button>
            <button :class="custom ? 'active' : ''" @click="choice('自定义')">自定义</button>
          </div>
          <div style="text-align: center">
            <el-date-picker
              v-model="value1"
              v-show="custom"
              type="datetimerange"
              range-separator="至"
              start-placeholder="开始日期"
              @change="changeTime"
              value-format="timestamp"
              :picker-options="pickeroptions"
              end-placeholder="结束日期"
            ></el-date-picker>
          </div>
          <p class="tips">若在账号监测时间段内无视频发布，本次监控也视为完成，无监控报告</p>
          <div class="remind">
            <span>发布视频提醒</span>
            <el-switch v-model="switchValue" active-color="#fd7f2c" inactive-color="#fbfbfb"></el-switch>
          </div>
          <p v-if="switchValue" class="push">视频发布后，将通过掌上精选数据公众号给您发送通知</p>
          <!-- 2.25 新添加的    结束 -->

          <p class="accFrequency">
            本次监测消耗
            <span v-if="consume">{{ consume }}</span>
            <span v-else>1</span>次账号监测次数，剩余
            <span v-if="surplus">{{ surplus }}</span>
            <span v-else>0</span>次账号监测次数。
          </p>
          <button
            class="startButton"
            :class="table_data.length == 0 ? 'disabled' : ''"
            v-bind:disabled="table_data.length == 0"
            @click="startMonitoring"
          >开始监测</button>
        </div>
      </el-dialog>
    </div>
    <!-- 列表弹窗 -->
    <div class="talentPopupList popup_load">
      <el-dialog :visible.sync="showListBox" custom-class="buyDialog">
        <div class="popupList">
          <p class="complete" v-if="MonitoringState == 2">监测已完成</p>
          <p class="complete" v-if="MonitoringState == 1">监测中</p>
          <p class="complete" v-if="MonitoringState == 0">监测未开始</p>
          <p class="complete" v-if="MonitoringState == 3">监测已取消</p>
          <ul>
            <li class="first">
              <div class="logo">
                <img :src="son.logo" @click="talentDetails(son.authorId)" />
              </div>
              <div class="popupListInfo">
                <p @click="talentDetails(son.authorId)">{{ son.nickName }}</p>
                <p>抖音号：{{ son.uniqueId }}</p>
              </div>
              <div>
                共监控到
                <span style="color: #fd7f2c">
                  {{
                  son.monitoringAwemeCount
                  }}
                </span>
                个视频
              </div>
            </li>
            <li v-for="(sonItem, ind) in sonALL" :key="ind + 'i'" class="rest">
              <div class="sonLogo">
                <img :src="sonItem.thumPic" @click="todetails(sonItem, 1)" />
              </div>
              <div class="sonListInfo">
                <p @click="todetails(sonItem, 0)">{{ sonItem.title }}</p>
                <p>{{ sonItem.releaseTime }}</p>
              </div>
              <div class="pu">
                <p>{{ format_num(sonItem.favoriteCount) }}</p>
                <p>点赞数</p>
              </div>
              <div class="pu">
                <p>{{ format_num(sonItem.commentCount) }}</p>
                <p>评论数</p>
              </div>

              <div class="pu">
                <p>{{ format_num(sonItem.shareCount) }}</p>
                <p>转发数</p>
              </div>
            </li>
          </ul>
          <div class="pageBox">
            <el-pagination
              background
              layout="prev, pager, next, jumper"
              :total="total"
              :page-size="5"
              :current-page="page"
              @current-change="get_data"
              :hide-on-single-page="true"
            ></el-pagination>
          </div>
          <div v-if="sonALL && sonALL.length == 0 && !loading" class="zw">
            <img src="@/assets/liu/zw.png" />
            <p>暂无数据</p>
          </div>
          <div
            v-if="sonlistLoading"
            class="sonlistLoading"
            v-loading="sonlistLoading"
            element-loading-text="拼命加载中"
            element-loading-spinner="el-icon-loading"
          ></div>
        </div>
      </el-dialog>
    </div>
    <div v-if="!AuthorMonitoList.length && !listLoading" class="zw">
      <img src="@/assets/liu/zw.png" />
      <p>暂无数据</p>
    </div>
  </div>
</template>

<script>
export default {
  props: {},
  data() {
    return {
      isdel: false,
      id: '',
      dialogVisible: false, //删除提示弹窗
      dialogVisible1: false, //删除提示弹窗
      AuthorMonitoList: [],
      showInclude: false,
      roomLoading: false,
      table_data: [],
      index: '',
      listLoading: false,
      popupList: false,
      author_id: '',
      input01: '',
      input02: '',
      value: '已完成',
      MonitoringState: 2,
      keyword: '',
      consume: '',
      surplus: '',
      options: ['未开始', '监测中', '已完成', '已取消'],

      page: 1,
      Hour: 24, //监控时间
      Start: '', //监控开始时间
      Stop: '', //监控结束时间
      frequency: null, //消耗次数
      value1: [new Date(), new Date().getTime() + 24 * 60 * 60 * 1000],
      choiceValue: '24小时', //监测时长,选择时间
      custom: false,
      switchValue: false, //直播提醒
      // 选择时间 不可选的日期
      pickeroptions: {
        disabledDate: time => {
          return (
            time.getTime() < Date.now() - 24 * 60 * 60 * 1000 ||
            time.getTime() > Date.now() + 30 * 24 * 60 * 60 * 1000
          ); // 返回 所有时间 大于 当前时间
        }
      },

      // 展示列表弹窗
      showListBox: false,
      son: {},
      total: 0,
      sonALL: [],
      loading: false,
      sonlistLoading: false,
      sId: null
    };
  },
  computed: {},
  created() {},
  mounted() {
    this.AuthorMonitor();
  },
  watch: {
    // 监控状态0未开始1监测中2监控结束3已取消,默认0
    value(newvalue) {
      this.isdel = false;
      if (newvalue == '全部') {
        this.MonitoringState = '';
      } else if (newvalue == '监测中') {
        this.MonitoringState = '1';
      } else if (newvalue == '未开始') {
        this.MonitoringState = '0';
      } else if (newvalue == '已完成') {
        this.MonitoringState = '2';
      } else if (newvalue == '已取消') {
        this.MonitoringState = '3';
      }
      this.AuthorMonitoList = [];
      this.AuthorMonitor();
    },
    // 搜索内容为空时，刷新页面
    input01: function (newVal, oldVal) {
      if (newVal == '') {
        this.keyword = '';
        this.AuthorMonitoList = [];
        this.AuthorMonitor();
      }
    }
  },
  methods: {
    // 管理
    but_admin() {
      this.isdel = !this.isdel;
    },
    //
    again(id, name) {
      this.input02 = name;
      this.popupList = true;
      this.GetAuthorMonitorUseNum();
      this.getData();
    },
    // 跳转详情
    talentDetails(id) {
      let router = this.$router.resolve({
        path: `/talent_main/tdetails/${id}/${0}`
      });
      window.open(router.href, '_blank');
    },
    cancel(id) {
      this.id = id;
      this.dialogVisible1 = true;
    },
    del(id) {
      this.id = id;
      this.dialogVisible = true;
    },
    //取消
    dialog() {
      this.$axios
        .post('/api/Author/AuthorMonitorCancel?AuthorMonitoringConfigID=' + this.id)
        .then(res => {
          if (res.data.code == 0) {
            this.dialogVisible1 = false;
            this.AuthorMonitoList = [];
            this.AuthorMonitor();
          } else {
            this.$message({
              message: res.data.msg,
              duration: 2000,
              customClass: 'includeMessage',
              offset: 154
            });
            this.dialogVisible1 = false;
          }
        });
    },
    //删除
    dialog1() {
      this.$axios
        .post('/api/Author/AuthorMonitorDel?AuthorMonitoringConfigID=' + this.id)
        .then(res => {
          if (res.data.code == 0) {
            this.dialogVisible = false;
            this.AuthorMonitoList = [];
            this.AuthorMonitor();
          } else {
            this.$message({
              message: res.data.msg,
              duration: 2000,
              customClass: 'includeMessage',
              offset: 154
            });
            this.dialogVisible = false;
          }
        });
    },
    search_input() {
      this.AuthorMonitoList = [];
      this.keyword = this.input01;
      this.AuthorMonitor();
    },
    // 取消
    // 、删除账号监测
    // 获取账号监测消耗剩余数量
    GetAuthorMonitorUseNum() {
      this.$axios
        .post('/api/Author/GetAuthorMonitoringUseNum', {
          Hour: this.Hour,
          Start: this.Start,
          Stop: this.Stop
        })
        .then(res => {
          if (res.data.code == 0) {
            this.consume = res.data.data.useNum;
            this.surplus = res.data.data.surplus;
          }
        });
    },
    // 增加账号监测
    SetAuthorMonitor() {
      this.$axios
        .post('/api/Author/AuthorMonitor', {
          AuthorId: this.author_id,
          IsRemind: this.switchValue, //是否提醒
          Hour: this.Hour, //小时数 优先级高
          Start: this.Start, //开始时间(优先低)
          Stop: this.Stop //结束时间(优先低)
        })
        .then(res => {
          if (res.data.code == 0) {
            this.consume = res.data.data.consume;
            this.surplus = res.data.data.surplus;
            this.AuthorMonitoList = [];
            this.AuthorMonitor();
          } else {
            this.$message({
              message: res.data.msg,
              duration: 2000,
              customClass: 'includeMessage',
              offset: 154
            });
          }
        });
    },
    close() {
      this.showInclude = false;
      // if( this.frequency){
      //  this.frequency.useNum = 1;
      // }
    },
    search_input1() {
      this.table_data = [];
      this.getData();
    },
    add() {
      this.input02 = '';
      this.popupList = true;
      this.table_data = [];
      this.GetAuthorMonitorUseNum();
    },
    // 开始检测
    startMonitoring() {
      this.SetAuthorMonitor();

      this.popupList = false;
    },
    //选择达人
    choiceTalent(i, author_id) {
      this.index = i;
      this.author_id = author_id;
    },
    // 账号监测列表接口
    AuthorMonitor() {
      this.listLoading = true;
      this.$axios
        .post('/api/Author/GetAuthorMonitor', {
          MonitoringState: this.MonitoringState,
          keyword: this.keyword
        })
        .then(result => {
          if (result.data.code == 0) {
            this.AuthorMonitoList = result.data.data;
            this.listLoading = false;
          } else {
            this.AuthorMonitoList = [];
            this.listLoading = false;
          }
          if(!this.AuthorMonitoList.length||!this.AuthorMonitoList){
            this.AuthorMonitoList = []
            this.isdel = false;
          }
        })
        .catch(err => {
          console.log(err);
          this.listLoading = false;
        });
    },
    // 达人搜索
    getData(cpage) {
      this.table_data = [];
      let that = this;
      that.roomLoading = true;
      this.$axios
        .post('/api/author/search', {
          age: '不限',
          category: 0,
          city: '不限',
          fans: '不限', // 粉丝数范围
          favorite_count: '不限', //点赞数范围
          gender: 3,
          hint: '不限',
          is_shop: 0,
          is_top_sale: 0,
          keyword: this.input02,
          more_age: '不限',
          more_city: '不限',
          more_gender: 3,
          more_province: '不限',
          more_star: '不限',
          order_by: 'desc',
          page: 1,
          pro_count: '不限',
          province: '不限',
          size: '20',
          sort: 'totalfans',
          star: '不限',
          verify_type: '3',
          video_count: '不限' // 作品数
        })
        .then(response => {
          if (response.data.code == 0) {
            this.table_data = response.data.data;
            this.index = response.data.data[0].unique_id;
            this.author_id = response.data.data[0].author_id;
            this.roomLoading = false;
            this.showInclude = false;
          } else if (response.data.code == 1002) {
            this.showInclude = true;
            this.roomLoading = false;
          }
        })
        .catch(error => {
          console.log(error);
        });
    },
    choice(i) {
      this.choiceValue = i;
      if (this.choiceValue == '24小时') {
        this.Hour = 24;
      } else if (this.choiceValue == '48小时') {
        this.Hour = 48;
      } else if (this.choiceValue == '72小时') {
        this.Hour = 72;
      } else if (this.choiceValue == '7天') {
        this.Hour = 168;
      }
      if (this.choiceValue == '自定义') {
        this.value1 = [new Date(), new Date().getTime() + 24 * 60 * 60 * 1000];
        this.Start = this.timestamp(this.value1[0] / 1000, 'Y-M-D h:m:s');
        this.Stop = this.timestamp(this.value1[1] / 1000, 'Y-M-D h:m:s');
        this.custom = true;
        this.Hour = 0;
        // this.frequency.useNum = 0;
        this.choiceValue = '';
      } else {
        this.custom = false;
      }

      this.GetAuthorMonitorUseNum();
    },
    // 选择时间
    changeTime() {
      if (this.value1 == null) {
        // this.frequency.useNum = 0;
        this.value1 = [];
      }
      if (this.value1.length == 0) {
        this.choiceValue = [];
      } else {
        this.choiceValue = this.date_format(this.value1[1] - this.value1[0]);
        this.Start = this.timestamp(this.value1[0] / 1000, 'Y-M-D h:m:s');
        this.Stop = this.timestamp(this.value1[1] / 1000, 'Y-M-D h:m:s');
        this.GetAuthorMonitorUseNum();
      }
    },
    //时分秒换算
    date_format(micro_second) {
      // 总秒数
      var second = Math.floor(micro_second / 1000);
      // 天数
      var day = Math.floor(second / 3600 / 24);
      // 小时
      var hr = Math.floor((second / 3600) % 24);
      // 分钟
      var min = Math.floor((second / 60) % 60);
      // 秒
      var sec = Math.floor(second % 60);
      return day + '天' + hr + '小时' + min + '分钟' + sec + '秒';
    },
    monitorList(i, id) {
      console.log(i, id);
      this.page = 1;
      this.sonALL = [];
      this.sId = id;
      this.showListBox = true;
      this.LiveMonitoringHistory1(id);
      this.son = this.AuthorMonitoList[i];
    },
    LiveMonitoringHistory1() {
      this.loading = true;
      this.sonlistLoading = true;
      this.$axios
        .post('/api/Author/AuthorMonitoringHistory', {
          AuthorMonitoringConfigID: this.sId,
          PageIndex: this.page,
          PageSize: 5
        })
        .then(res => {
          if (res.data.code == 0) {
            this.total = res.data.data.pageInfo.totalCount;
            this.sonALL = res.data.data.list;
            this.loading = false;
            this.sonlistLoading = false;
          } else {
            this.loading = false;
            this.sonlistLoading = false;
          }
        });
    },
    // 分页
    get_data(cpage) {
      if (cpage) {
        this.page = cpage;
      } else {
        this.page = 1;
      }

      this.sonALL = [];
      this.LiveMonitoringHistory1();
    },
    // 点击跳转视频详情
    todetails(item, status) {
      // talent_main/videoDetails?id=7022614220835507486
      console.log(item, status);
      if (status == 1) {
        window.open(item.url);
      } else {
        let router = this.$router.resolve({
          path: `/talent_main/videoDetails?id=${item.awemeId}`
        });
        window.open(router.href, '_blank');
      }
    }
  },
  components: {}
};
</script>

<style scoped lang="less">
#accountMonitorCon {
  min-height: 86vh;
  position: relative;
  .imgBox {
    background: url('../../../../assets/wang/talentCompare/search-nohover.png') no-repeat 10px 7px,
      #fff;
    background-size: 15px 15px;
  }
  .imgBox:hover {
    background: url('../../../../assets/wang/talentCompare/search.png') no-repeat 10px 7px, #fff;
    background-size: 15px 15px;
  }
  .header {
    padding-left: 20px;
    padding-top: 20px;
    padding-bottom: 15px;
    padding-right: 20px;
    .section_01 {
      display: flex;
      justify-content: space-between;
      .section_01_box {
        display: flex;
      }
    }
    .but_complete {
      width: 77px;
      height: 32px;
      border-radius: 4px;
      border: solid 1px #fd7f2c;
      font-size: 14px;
      line-height: 28px;
      letter-spacing: 0px;
      color: #fd7f2c;
      position: relative;
      margin-right: 10px;
    }
    .but_admin {
      margin-right: 10px;
      width: 77px;
      height: 32px;
      font-size: 14px;
      line-height: 28px;
      color: #222222;
      border-radius: 4px;
      border: solid 1px #e6e6e6;
      position: relative;
      top: 1px;
      > img {
        width: 14px;
        height: 13px;
        vertical-align: middle;
        margin-top: -2px;
      }
    }
    .tit {
      width: 56px;
      height: 14px;
      font-size: 14px;
      line-height: 30px;
      letter-spacing: 0px;
      color: #555555;
      padding-right: 10px;
    }
    .input_group {
      display: inline-block;
      margin-left: 11px;
      position: relative;
      width: 308px;
      height: 32px;
      border-radius: 4px 4px 4px 4px;
      border: solid 1px #e5e5e5;
      box-sizing: border-box;
      overflow: hidden;
      input {
        width: 100%;
        font-size: 14px;
        vertical-align: -1px;
        // background-color: #f5f5f5;
        height: 100%;
        box-sizing: border-box;
        padding-left: 11px;
        padding-right: 38px;
        border: none;
        color: #222;
      }
      input::-webkit-input-placeholder {
        color: #b5b5b5 !important;
      }
      > div {
        position: absolute;
        right: 0;
        cursor: pointer;
        top: 0px;
        text-align: center;
        width: 38px;
        height: 32px;
        border-left: 1px solid #e5e5e5;
        border-radius: 0px 4px 4px 0px;
        display: flex;
        align-items: center;
        justify-content: center;
        img {
          width: 15px;
        }
      }
    }
    .add {
      float: right;
      padding: 0 15px;
      height: 32px;
      background-color: #fd7f2c;
      border-radius: 4px;
      font-size: 14px;
      line-height: 30px;
      color: #ffffff;
      > img {
        width: 12px;
        height: 12px;
        margin-top: -3px;
      }
    }
  }
  .ul {
    width: 100%;
    // min-height: 500px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    box-sizing: border-box;
    flex-wrap: wrap;
    // justify-content: space-between;
    li {
      width: 25%;
      padding-right: 15px;
      box-sizing: border-box;
      &:nth-child(4n) {
        padding-right: 0;
      }
      .item_box {
        padding-left: 15px;
        padding-right: 15px;
        // height: 178px;
        background-color: #ffffff;
        box-shadow: 0px 0px 16px 0px rgba(241, 241, 241, 0.8);
        border-radius: 4px;
        box-sizing: border-box;
        margin-bottom: 10px;
        padding-top: 15px;
      }
      .top {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding-bottom: 15px;
        border-bottom: 1px solid #e5e5e5;
        .gif {
          position: absolute;
          cursor: pointer;
          top: -6px;
          left: -6px;
          width: 68px;
          height: 68px;
          animation: rainbow 3s linear infinite normal;
        }
        .logo {
          width: 50px;
          height: 50px;
          border-radius: 50%;
          background-color: #ffffff;
          margin-right: 10px;
          cursor: pointer;
        }
        .cen {
          width: 0;
          flex: 1;
          .name {
            // display: inline-block;
            // width: 150px;
            padding-top: 7px;
            padding-bottom: 3px;
            cursor: pointer;
            max-width: 180px;
            font-size: 14px;
            font-weight: 600;
            color: #222222;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            &:hover {
              color: #ff924b;
            }
          }
          > p {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            // width: 150px;
            font-size: 14px;
            letter-spacing: 0px;
            color: #888888;
          }
        }
        .rig {
          align-self: center;
          > button {
            width: 100px;
            height: 34px;
            border-radius: 4px;
            border: 1px solid #fd7f2c;
            font-size: 14px;
            line-height: 30px;
            letter-spacing: 0;
            color: #fd7f2c;
            // margin-top: 11px;
            &:hover {
              border: 1px solid #ff924b;
              color: #ff924b;
            }
          }
          .again {
            width: 100px;
            height: 34px;
            border-color: #fd7f2c !important;
            border-radius: 4px;
            font-size: 14px;
            line-height: 30px;
            letter-spacing: 0px;
            color: #fd7f2c;
            &:hover {
              border-color: #ff924b !important;
              color: #ff924b;
            }
          }
        }
      }
      .new_monitor_box {
        padding: 13px 0;
        border-bottom: 1px solid #e5e5e5;
        box-sizing: border-box;
        .monitor_top {
          display: flex;
          justify-content: space-between;
          font-size: 13px;
          .title {
            color: #888888;
          }
          .data {
            color: #555555;
            cursor: pointer;
          }
          .data:hover {
            color: #fd7f2c;
          }
          span {
            color: #fd7f2c;
            margin: 0 2px;
          }
        }
        .monitor_btm {
          font-size: 13px;
          color: #222;
          margin-top: 5px;
        }
      }
      .bot {
        > div {
          &:nth-child(2) {
            display: flex;
          }
        }
        .accountNumberBot {
          display: flex;
          padding-top: 15px;
          > div {
            flex: 1;
            > p {
              white-space: nowrap;
              &:nth-child(1) {
                line-height: 21px;
                font-family: DINAlternate-Bold;
                font-size: 16px;
                letter-spacing: 0px;
                color: #222222;
              }
              &:nth-child(2) {
                font-size: 13px;
                letter-spacing: 0px;
                color: #888888;
              }
              &:nth-child(3) {
                padding-top: 10px;
                padding-bottom: 10px;
                font-size: 12px;
                letter-spacing: 0px;
                color: #888888;
                > span {
                  font-family: DINAlternate-Bold;
                  font-size: 11px;
                  letter-spacing: 0px;
                  color: #fd7f2c;
                }
              }
            }
            .pingImg {
              width: 6px;
              height: 9px;
              // transform: rotate(180deg);
              vertical-align: baseline;
            }
          }
        }
        .contrast {
          width: 100%;
          justify-content: flex-end;

          > button {
            &:hover {
              color: #ea1b0b;
            }
            font-size: 14px;
            letter-spacing: 0px;
            color: #888888;
            line-height: 18px;
            &:nth-child(1) {
              position: relative;
              &::after {
                content: '';
                position: absolute;
                right: 0;
                top: 6px;
                width: 1px;
                height: 10px;
                background-color: #e5e5e5;
              }
            }
          }
        }
      }
    }
  }
  .talentPopupList {
    .accountDiolog {
      .title {
        text-align: left;
        // padding-bottom: 15px;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0px;
        color: #222222;
        position: relative;
        text-indent: 9px;
        &::after {
          content: '';
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 4px;
          height: 16px;
          background-color: #fd7f2c;
          border-radius: 2px;
        }
      }
      .input_group {
        display: inline-block;
        position: relative;
        // left: 80px;
        width: 370px;
        height: 31px;
        margin-top: 13px;
        border-radius: 4px 4px 4px 4px;
        border: solid 2px #fd7f2c;
        box-sizing: border-box;
        overflow: hidden;
        input {
          width: 100%;
          font-size: 14px;
          vertical-align: -1px;
          height: 100%;
          box-sizing: border-box;
          padding-left: 11px;
          padding-right: 38px;
          border: none;
          color: #222;
        }
        input::-webkit-input-placeholder {
          color: #b5b5b5 !important;
        }
        > div {
          position: absolute;
          right: 0;
          cursor: pointer;
          top: -2px;
          text-align: center;
          width: 38px;
          height: 32px;
          background-color: #fd7f2c;
          border-radius: 0px 4px 4px 0px;
          display: flex;
          align-items: center;
          justify-content: center;
          img {
            width: 15px;
          }
        }
      }
      .searchResult {
        height: 330px;
        overflow-y: scroll;
        overflow-x: hidden;
        width: 370px;
        margin: auto;
        margin-top: 15px;
        margin-bottom: 20px;
        li {
          padding-top: 14px;
          display: flex;
          width: 350px;
          height: 80px;

          background-color: #ffffff;
          border-radius: 4px;
          border: solid 1px #e5e5e5;
          padding-left: 14px;
          padding-right: 14px;
          box-sizing: border-box;
          .logo {
            width: 50px;
            height: 50px;
            background-color: #ffffff;
            overflow: hidden;
            border-radius: 50%;
            margin-right: 10px;
            > img {
              width: 100%;
              height: 100%;
              border-radius: 50%;
            }
          }
        }
      }
      .jc_no_data {
        width: 100%;
        height: 300px;
        position: relative;
      }
      .duration {
        width: 372px;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0px;
        color: #222222;
        padding-top: 17px;
        padding-bottom: 14px;
        margin: auto;
        text-align: left;
        > span {
          font-size: 12px;
          color: #888888;
          font-weight: 400;
          float: right;
        }
      }
      .choice {
        display: flex;
        width: 370px;
        border: solid 1px #e5e5e5;
        border-radius: 4px;

        margin: auto;
        overflow: hidden;
        > button {
          font-size: 14px;
          width: 78px;
          height: 32px;
          line-height: 32px;
          text-align: center;
          background-color: #ffffff;
          border-right: solid 1px #e5e5e5;

          padding: 0 !important;
          &:nth-child(5) {
            border-right: none;
          }
        }
        .active {
          background: #fd7f2c;
          color: #fff;
        }
      }
      .tips {
        padding-top: 8px;
        width: 372px;
        margin: auto;
        font-size: 12px;
        font-weight: normal;
        font-stretch: normal;
        line-height: 18px;
        letter-spacing: 0px;
        color: #888888;
      }
      .remind {
        width: 370px;
        margin: auto;
        margin-top: 5px;
        text-align: left;
        > span {
          font-size: 14px;
          font-weight: 600;
          line-height: 30px;
          letter-spacing: 0px;
          color: #222222;
        }
      }
      .startButton {
        margin-top: 20px;
      }
      .accFrequency {
        margin-top: 30px;
      }
      .push {
        width: 370px;
        margin: auto;
        font-size: 12px;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 0px;
        color: #555555;
        margin-top: 5px;
        text-align: left;
      }
      .rule {
        width: 370px;
        margin: auto;
        font-size: 12px;
        font-weight: normal;
        line-height: 20px;
        letter-spacing: 0px;
        color: #888888;
        margin-top: 10px;
      }
    }
    .hotRoomBox {
      width: 572px;
      padding: 20px 20px;
      border-radius: 4px;
      box-sizing: border-box;
      .active_Talent {
        border: 1px solid #fd7f2c !important;
      }
      .addIncludeBtn {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 110px;
        height: 40px;
        line-height: 40px;
        background-color: #fd7f2c;
        border-radius: 4px;
        margin: 0 auto;
        margin-top: 30px;
        cursor: pointer;
        img {
          width: 16px;
          height: 16px;
          margin-right: 5px;
        }
        span {
          font-size: 14px;
          color: #ffffff;
        }
      }
      .Talent_list {
        height: 250px;
        width: 370px;
        margin: auto;
        overflow-y: scroll;
        overflow-x: hidden;
        margin-top: 20px;

        > li {
          display: flex;
          width: 350px;
          height: 77px;
          background-color: #ffffff;
          border-radius: 4px;
          border: solid 1px #e5e5e5;
          margin-bottom: 15px;
          padding: 12px 14px;
          box-sizing: border-box;
          position: relative;
          cursor: pointer;
          > div {
            &:nth-child(1) {
              width: 50px;
              height: 50px;
              border-radius: 50%;
              > img {
                width: 100%;
                height: 100%;
                border-radius: 50%;
              }
            }
            &:nth-child(2) {
              margin-left: 8px;
              max-width: 224px;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              margin-top: 5px;
              flex: 1;
              > p {
                &:nth-child(1) {
                  font-size: 14px;
                  margin-bottom: 1px;
                  font-weight: 600;
                  letter-spacing: 0px;
                  color: #222222;
                  max-width: 210px;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                  margin-bottom: 3px;
                }
                &:nth-child(2) {
                  margin-bottom: 1px;
                  font-size: 14px;
                  letter-spacing: 0px;
                  color: #888888;
                  max-width: 210px;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                }
                &:nth-child(3) {
                  font-size: 14px;
                  letter-spacing: 0px;
                  color: #888888;
                  max-width: 210px;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                }
              }
            }
            &:nth-child(3) {
              position: absolute;
              right: 20px;
              width: 16px;
              height: 16px;
              border-radius: 50%;
              // margin-top: 22px;
              align-self: center;

              > img {
                width: 100%;
                height: 100%;
                border-radius: 50%;
                vertical-align: top;
              }
            }
          }
        }
      }
      .title {
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0px;
        color: #222222;
        position: relative;
        text-indent: 9px;
        &::after {
          content: '';
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 4px;
          height: 16px;
          background-color: #fd7f2c;
          border-radius: 2px;
        }
      }
      .txt {
        width: 532px;
        font-size: 13px;
        padding: 13px 0;
        box-sizing: border-box;
        letter-spacing: 0px;
        color: #888888;
        border-bottom: 1px solid #e5e5e5;
        margin-bottom: 20px;
      }
      .input_group {
        display: inline-block;
        position: relative;
        left: 80px;
        overflow: hidden;
        width: 370px;
        height: 32px;
        border-radius: 4px 4px 4px 4px;
        border: solid 2px #fd7f2c;
        box-sizing: border-box;
        input {
          width: 100%;
          font-size: 14px;
          vertical-align: -1px;
          height: 100%;
          box-sizing: border-box;
          padding-left: 11px;
          padding-right: 38px;
          border: none;
          color: #222;
        }
        input::-webkit-input-placeholder {
          color: #b5b5b5 !important;
        }
        > div {
          position: absolute;
          right: 0;
          cursor: pointer;
          top: -2px;
          text-align: center;
          width: 38px;
          height: 32px;
          background-color: #fd7f2c;
          border-radius: 0px 4px 4px 0px;
          display: flex;
          align-items: center;
          justify-content: center;
          img {
            width: 15px;
          }
        }
      }
      .duration {
        width: 372px;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0px;
        color: #222222;
        padding-top: 17px;
        padding-bottom: 14px;
        margin: auto;
        > span {
          font-size: 12px;
          color: #888888;
          font-weight: 400;
          float: right;
        }
      }
      .choice {
        display: flex;
        width: 370px;
        border: solid 1px #e5e5e5;
        border-radius: 4px;

        margin: auto;
        overflow: hidden;
        > button {
          font-size: 14px;
          width: 78px;
          height: 32px;
          line-height: 32px;
          text-align: center;
          background-color: #ffffff;
          border-right: solid 1px #e5e5e5;

          padding: 0 !important;
          &:nth-child(5) {
            border-right: none;
          }
        }
        .active {
          background: #fd7f2c;
          color: #fff;
        }
      }
      .tips {
        padding-top: 8px;
        width: 372px;
        margin: auto;
        font-size: 12px;
        font-weight: normal;
        font-stretch: normal;
        line-height: 18px;
        letter-spacing: 0px;
        color: #888888;
      }
      .remind {
        width: 370px;
        margin: auto;
        margin-top: 5px;
        > span {
          font-size: 14px;
          font-weight: 600;
          line-height: 30px;
          letter-spacing: 0px;
          color: #222222;
        }
      }
      .push {
        width: 370px;
        margin: auto;
        font-size: 12px;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 0px;
        color: #555555;
        margin-top: 5px;
      }
      .rule {
        width: 370px;
        margin: auto;
        font-size: 12px;
        font-weight: normal;
        line-height: 20px;
        letter-spacing: 0px;
        color: #888888;
        margin-top: 10px;
      }
      .frequency {
        width: 370px;
        line-height: 26px;
        margin: auto;
        margin-top: 20px;
        background: #fafafa;
        // width: 316px;
        text-align: center;
        font-size: 12px;
        letter-spacing: 0px;
        color: #222222;
        > span {
          color: #fd7f2c;
        }
      }
      .testing {
        width: 370px;
        margin: auto;
        text-align: center;
        margin-top: 20px;
        > button {
          width: 258px;
          height: 46px;
          font-size: 14px;
          background-color: #fd7f2c;
          border-radius: 4px;
          text-align: center;
          color: #fff;
        }
      }
    }
    .popupList {
      padding: 20px;
      // padding: 20px 15px;
      box-sizing: border-box;
      height: 590px;
      .complete {
        font-size: 16px;
        font-weight: 600;
        // line-height: 30px;
        letter-spacing: 0px;
        text-align: left;
        color: #222222;
      }
      > ul {
        li {
          border-bottom: 1px solid #efefef;
          box-sizing: border-box;
          .pu {
            width: 12%;
          }
        }
      }
    }
    .sonlistLoading {
      width: 150px;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
  }
  .popup_load {
    /deep/.el-dialog {
      width: 1050px;
    }
  }
  // .again {
  //   font-size: 14px;
  //   letter-spacing: 0;
  //   color: #1779ff !important;
  //   cursor: pointer;
  //   // margin-left: 10px;
  // }
  .ea1b0b {
    color: #ea1b0b !important;
  }
}
.sonListInfo {
  p {
    white-space: nowrap;
    width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media screen and (max-width: 1400px) {
  #accountMonitorCon .ul li {
    width: 33.33%;
    padding-right: 10px !important;
    &:nth-child(3n) {
      padding-right: 0;
    }
  }
}
</style>
